package com.lineage.server.command.executor;

import com.lineage.server.datatables.DropTable;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_SystemMessage;
import com.lineage.server.serverpackets.ServerBasePacket;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class L1ReloadDrop implements L1CommandExecutor {
  private static final Log _log = LogFactory.getLog(L1ReloadDrop.class);
  
  public static L1CommandExecutor getInstance() {
    return new L1ReloadDrop();
  }
  
  public void execute(L1PcInstance pc, String cmdName, String arg) {
    if (pc == null) {
      _log.warn("系统命令执行: " + cmdName + "重新载入掉宝资料数量。");
    } else {
      pc.sendPackets((ServerBasePacket)new S_SystemMessage("重新载入掉宝资料数量"));
    } 
    DropTable.get().load();
  }
}
